""" 
CSDN : heart_6662
PYTHON amateur   
"""
board = [["X",".",".","X"],[".",".",".","X"],[".",".",".","X"]]
m, n = len(board), len(board[0])
for i, row in enumerate(board):
    for j, ch in enumerate(row):
        if ch == 'X':
            row[j] = '.'
for k in range(j + 1, n):
    if row[k] != 'X':
        break
    row[k] = '.'
for k in range(i + 1, m):
    if board[k][j] != 'X':
        break
        board[k][j] = '.'
    ans += 1





